package com.APIObject.Clone;

public class Test2 {
    public static void main(String[] args) throws CloneNotSupportedException {
        User u1=new User(0,"魏正想","11235813",new double[]{100,23,99.5});
        User u2= (User) u1.clone();//得到的是Object类需要转成User类
        System.out.println(u2.getId());
        System.out.println(u2.getUsername());
        System.out.println(u2.getScores());
        System.out.println(u1.getId());
        System.out.println(u1.getUsername());
        System.out.println(u1.getScores());//数组中克隆得到的对象的地址相同。
    }
}
